package study.javaee.practice.controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import study.javaee.practice.common.api.CommonResult;

/**
 * Rest异常处理类
 */
@RestController
@RequestMapping("/rest_err")
public class ErrorController {
    @GetMapping
    public CommonResult<Object> restErr(Integer code, String message){
        return new CommonResult<>(code, message);
    }
}
